import { ShowTypeBaseAmcaxProp } from '@app-nextmesh/widgets/LeftPanel/SloverConfig/baseAmcaxProp';

export const GaloisConfig = {
  boundaries: {
    AmcaxProp: {
      childCreatable: true, // 是否可以添加新的子项
    },
    Wall: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      SelectType: {
        Label: 'Type',
        Type: 'option',
        Options: [
          'SlidingSurface',
          'IsothermalSurface',
          'AdiabaticSurface',
          'NonSlipWall',
        ],
        Default: '',
      },
      Region: {
        Type: 'Node',
      },
    },
    FarField: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Region: {
        Type: 'Node',
      },
    },
    SymmetricBoundary: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Region: {
        Type: 'Node',
      },
    },
    Imports: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Region: {
        Type: 'Node',
      },
    },
    Exports: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Region: {
        Type: 'Node',
      },
    },
    PressureOutlet: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Region: {
        Type: 'Node',
      },
    },
    DesignCondition: {
      AmcaxProp: ShowTypeBaseAmcaxProp,
      Mach: {
        Type: 'double',
        Default: 0.75,
        max: 1,
      },
      Angle: {
        Type: 'double',
        Default: 2.0,
      },
      Re: {
        Type: 'double',
        Default: 100000,
      },
      Order: {
        Label: 'Type',
        Type: 'option',
        Options: ['CONSTANT', 'FIRST'],
        Default: 'CONSTANT',
      },
    },
  },

  solver: {
    AmcaxProp: {
      selfEditKey: '', // 表示本身就是一个对象，可以左键弹出表单编辑，值是对应的表单名称，空字符串表示自身；
      nameEditable: false, // 表示是否可以编辑名称；
    },
    'Thread number': {
      Type: 'int',
      Default: 8,
    },
    'Time period': {
      Type: 'double',
      // Unit: 'time',
      // DefaultUnit: 's',
      Default: 1,
    },
    'Time increment': {
      Type: 'double',
      // Unit: 'time',
      // DefaultUnit: 's',
      Default: 0.001,
    },
    'Nonlinear step': {
      Type: 'int',
      Default: 3,
    },
    'Linear step': {
      Type: 'int',
      Default: 2,
    },
    'Max increments': {
      Type: 'int',
      Default: 20,
    },
    'Nonlinear threshold': {
      Type: 'double',
      Default: 0.001,
    },
    'Linear threshold': {
      Type: 'double',
      Default: 0.0000000001,
    },
    SolverType: {
      Label: 'Type',
      Type: 'option',
      Options: ['CPU'],
      Default: 'CPU',
    },
  },
};
